<template>
	<!-- 插屏广告 -->
	<view>
		<ad-interstitial :adpid="adpid" :loadnext="true" v-slot:default="{loading, error}" @load="onadload"
			@close="onadclose" @error="onaderror" ref="adInterstitial">
			<!-- <button :disabled="loading" :loading="loading">显示广告</button> -->
			<view v-if="error">{{error}}</view>
		</ad-interstitial>
	</view>
</template>

<script>
	export default {
		name: "ad-common-interstitial",
		data() {
			return {
				adpid: "1076934123"
			};
		},
		methods: {
			onadload(e) {
				// console.log('插屏广告加载成功',e);
			},
			onadclose(e) {
				// console.log('插屏广告关闭',e);
			},
			onaderror(e) {
				// 广告加载失败
				// console.log('插屏广告加载失败',e);
			},
			show(){
				this.$refs.adInterstitial.show()
			}
		}
	}
</script>

<style lang="scss">

</style>
